In order to improve the performance of a system including databases, there is a method using multiple in-memory and back-end databases. The in-memory database is also called in-core database or main memory database. The in-memory database is to store data in a semiconductor memory instead of a hard disk drive. The back-end database is a main database that includes data as the source of the in-memory database. The in-memory database holds all or part of data of the back-end database, and is used as a cache for the back-end database. The in-memory database processes database I/O on the semiconductor memory without reading from or writing to the hard disk drive. Therefore, in the in-memory database, data read or written by an application is held in a cache on the memory by means of the in-memory database, accessing the database of the hard disk drive by a process totally independent of the application. From the standpoint of the application, SQL is issued to the in-memory database in a way without any difference from the database on the hard disk drive. Then, a query request from the application is processed by the in-memory database. Using the in-memory database, a data set is retrieved from the in-memory database. This results in reducing the load on the back-end database and improving the processing speed as the database dramatically.
Data in the back-end database is updated. Therefore, the in-memory database needs to reflect the update therein. The in-memory database has to load data from the back-end database to perform the update. Typical conventional methods for achieving the reflection include a periodic synchronization method and a real-time synchronization method.
Periodic Synchronization Method
The periodic synchronization method is a method of applying a data set of the back-end database to the in-memory database collectively on a periodic basis to update the data set of the in-memory database. This update provides synchronization between the back-end database and the in-memory database. In general, processing data collectively in a large batch imposes less load on the database than processing data in small batches. Therefore, the periodic synchronization method enables replication from the back-end database to the in-memory database while reducing the load on the back-end database. However, the data set of the in-memory database is a data set at the time of periodic synchronization, not the latest data set. Thus, the periodic synchronization method has a problem that the database users cannot issue, to the in-memory database, such a search or retrieval request that requires the latestness or currency of data.
As a retrieval technique to solve the above-mentioned problem of the periodic synchronization method, there is pass-through retrieval. The pass-through retrieval is a retrieval technique that has already been put to practical use as one of in-memory database techniques. The method using the pass-through retrieval is executed concurrently with the above-mentioned periodic synchronization method. In the pass-through retrieval, if such a retrieval request that requires data currency is issued to the in-memory database, this retrieval request is transmitted to the back-end database. Therefore, the system searches the back-end database. However, if the search criteria are complicated, since the load on the back-end database increases, the performance of the entire system will be reduced.
2. Real-Time Synchronization Method
The real-time synchronization method is a method in which the system transmits, in response to an update of the back-end database, the updated data set of the back-end database to the in-memory database to update the data set of the in-memory database promptly. This update provides real-time synchronization between the back-end database and the in-memory database, thus resolving the above-mentioned problem of the periodic synchronization method. However, in the real-time synchronization method, if the frequency of updates to the back-end database is high, the system will perform replication from the back-end database to the in-memory database frequently in small batches. Such frequent replication attempts increase the load on the back-end database, resulting in a further reduction in the performance of the entire system. In addition, the above-mentioned replication is performed regardless of whether the currency of data to be retrieved from the in-memory database is required. However, when many of retrieval requests to be issued to the in-memory database do not require data currency, it is less likely that the updated, latest data set will be required. Therefore, the replication could be useless processing that merely reduces the performance of the entire system.